# -*- coding: utf-8 -*- 
# @project : 《Atcoder》
# @Author : created by bensonrachel on 2021/11/20
# @File : 228.C - Final Day.py

n,k = map(int,input().split())
r = []
b = ["No"]*n
for i in range(n):
    p1,p2,p3 = map(int,input().split())
    r.append((i+1,p1+p2+p3))

r.sort(key=lambda x :x[1],reverse=True)
for i in range(k):
    b[r[i][0]-1] = "Yes"
for i in range(k,n):
    if r[i][1] + 300 >= r[k-1][1]:
        b[r[i][0] - 1] = "Yes"
for x in b:
    print(x)


